<input type="hidden" name="<?php echo $this->getNamePrefix() ?>[__empty]" value="1" id="<?php echo $this->getHtmlId() ?>" />
<ul class="checkboxes">
<?php foreach ($this->getLabels() as $name => $label): ?>
    <li>
        <input type="checkbox" value="1" name="<?php echo $this->getNamePrefix() ?>[<?php echo $name ?>]" id="<?php echo $this->getHtmlId() . '_' . $name ?>"<?php echo ($this->getIsChecked($name) ? ' checked="checked"' : '') ?>/><label for="<?php echo $this->getHtmlId() . '_' . $name ?>">
            <?php echo $label ?>
        </label>
    </li>
<?php endforeach;?>
</ul>

<script type="text/javascript">
//<![CDATA[
    var weeLoggingActionsLabel = $('<?php echo $this->getHtmlId() ?>').up('table').select('td.label label');
    if (weeLoggingActionsLabel) {
        var weeLoggingActions = $('<?php echo $this->getHtmlId() ?>').parentNode.select('ul.checkboxes input');
        if (weeLoggingActions) {
            var weeLoggingShouldBeChecked = true;
            Event.observe(weeLoggingActionsLabel[0], 'click', function () {
                for (var i = 0; i < weeLoggingActions.length; i++) {
                    weeLoggingActions[i].checked = weeLoggingShouldBeChecked;
                }
                weeLoggingShouldBeChecked = !weeLoggingShouldBeChecked;
            });
        }
    }
//]]>
</script>
